package com.chain.BrotherExchange.data.model;

import com.chain.BrotherExchange.R;

import java.text.DecimalFormat;
import java.util.List;

public class LegalTenderAssetsDetails extends BaseResponseModel<LegalTenderAssetsDetails.DataBean> {


    public static class DataBean {
        /**
         * list : [{"created_time":"2018-07-23 04:11:24","id":1,"num":1,"operator":5,"token_id":1,"token_name":"BTC","trade_name":"adminadmin","trade_uid":1,"uid":1}]
         * page : 1
         * page_num : 10
         * total : 100
         */

        private int page;
        private int page_num;
        private int total;
        private List<ListBean> list;

        public int getPage() {
            return page;
        }

        public void setPage(int page) {
            this.page = page;
        }

        public int getPage_num() {
            return page_num;
        }

        public void setPage_num(int page_num) {
            this.page_num = page_num;
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean {
            /**
             * created_time : 2018-07-23 04:11:24
             * id : 1
             * num : 1
             * operator : 5
             * token_id : 1
             * token_name : BTC
             * trade_name : adminadmin
             * trade_uid : 1
             * uid : 1
             */

            private String created_time;
            private int id;
            private double num;
            private int operator;
            private int token_id;
            private String token_name;
            private String trade_name;
            private int trade_uid;
            private int uid;

            public int getOperatorText(){
                if (operator == 1){
                    return R.string.buy_ins;
                }

                return R.string.sale;
            }

            public String getNumberText(){
                return new DecimalFormat("########.########").format(num);
            }

            public String getCreated_time() {
                return created_time;
            }

            public void setCreated_time(String created_time) {
                this.created_time = created_time;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public double getNum() {
                return num;
            }

            public void setNum(double num) {
                this.num = num;
            }

            public int getOperator() {
                return operator;
            }

            public void setOperator(int operator) {
                this.operator = operator;
            }

            public int getToken_id() {
                return token_id;
            }

            public void setToken_id(int token_id) {
                this.token_id = token_id;
            }

            public String getToken_name() {
                return token_name;
            }

            public void setToken_name(String token_name) {
                this.token_name = token_name;
            }

            public String getTrade_name() {
                return trade_name;
            }

            public void setTrade_name(String trade_name) {
                this.trade_name = trade_name;
            }

            public int getTrade_uid() {
                return trade_uid;
            }

            public void setTrade_uid(int trade_uid) {
                this.trade_uid = trade_uid;
            }

            public int getUid() {
                return uid;
            }

            public void setUid(int uid) {
                this.uid = uid;
            }
        }
    }
}
